﻿using Face8280WebSocketServer.DB.Device;
using Face8280WebSocketServer.DB.NewModel.Device;
using Face8280WebSocketServer.DTO;
using Face8280WebSocketServer.DTO.FaceDevice;
using Face8280WebSocketServer.Utility.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
using System.Threading.Tasks;

namespace Face8280WebSocketServer.Interface
{
    public interface IFaceDriveServiceNew: IBaseService
    {
        /// <summary>
        /// 查询分页数据
        /// </summary>
        /// <param name="oWheres"></param>
        /// <param name="page"></param>
        /// <returns></returns>
        PageResult<DB.Device.FaceDeviceDetail_PageModel> GetDevicePage(List<Expression<Func<FaceDeviceInfo, bool>>> oWheres, BasePageParameter page);
        /// <summary>
        /// 获取设备详情
        /// </summary>
        /// <param name="SNList"></param>
        /// <returns></returns>
        public List<FaceDeviceStatus> GetDeviceOnlineStatus(List<string> SNList);
        /// <summary>
        /// 添加设备信息或修改设备信息
        /// </summary>
        /// <param name="device"></param>
        public JsonResultModel AddDevice(FaceDeviceInfo info);
        /// <summary>
        /// 删除设备信息
        /// </summary>
        /// <param name="id">设备主键</param>
        void DeleteDevice(int id);
        /// <summary>
        /// 删除设备信息
        /// </summary>
        /// <param name="id">设备主键</param>
        public void DeleteDeviceRange(int[] id);
        /// <summary>
        /// 删除设备信息
        /// </summary>
        /// <param name="id">设备ID</param>
        void DeleteDevice(string id);
        /// <summary>
        /// 根据设备ID获取设备详情
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        UpdateDeviceDetailParameter GetFaceDeviceById(string id);
        /// <summary>
        /// 根据设备主键获取设备详情
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        FaceDeviceInfo GetFaceDeviceById(int id);
        /// <summary>
        /// 添加或修改设备网络信息详情
        /// </summary>
        /// <param name="deviceIP"></param>
        void AddDeviceNetWorker(Face8280WebSocketServer.DB.NewModel.Device.FaceDeviceNetWork netWork);

        /// <summary>
        /// 删除设备网络信息详情
        /// </summary>
        /// <param name="DeviceId"></param>
        void DeleteDeviceNetWorker(int DeviceId);
        /// <summary>
        /// 根据连接类型查询设备列表
        /// </summary>
        /// <param name="type">设备连接类型
        /// <para>0--服务端连接 （由电脑端发起连接）</para>
        /// <para>1--客户端连接 （由设备端发起连接）</para>
        /// </param>
        /// <returns></returns>
        public List<FaceDeviceInfo> GetFaceDevicesByConnectTyep(int type);

        public string GetDefaultSn();

        public List<FaceDeviceInfo> GetAllList();

        public void UpdateNetWork(WriteNetWorkParameter parameter);
    }
}
